import 'package:flutter/material.dart';
import 'package:lark_flutter_learn/route/MainNavigatorWidget.dart';
import 'package:lark_flutter_learn/route/RoutePath.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Learn',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),

      /// 两种自定义导航栏
      // home: const CustomBottomNavigationBar(),
      home: const MainNavigatorWidget(),
      routes: RoutePath.routeMap.map((key, value) {
        return MapEntry(
            key.substring(0, key.indexOf(' - ')), (context) => value);
      }),
    );
  }
}
